<?php
include ('config.php');
$sql="select * from page ORDER BY pid desc";
$sql_result=$db->query($sql);
$rows=array();
while ($row=$sql_result->fetch_array(MYSQLI_ASSOC)){
    $rows[]=$row;
}
;?>
<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8" />
    <title><?php echo $set_is['title'];?></title>
    <?php include ('headr.php'); ;?>
</head>
<body>
<div class="container">
    <div class="jumbotron">
        <h1><?php echo $set_is['title'];?></h1>
        <p class="lead"><?php echo $set_is['intro'];?></p>
    </div>
</div>
<div class="container">
    <div class="row">
        <div class="col-md-3">
            <div class="panel panel-default">
                <div class="panel-heading">作者简介</div>
                <div class="panel-body">
                    这是一个小框，用来介绍作者的
                </div>
            </div>
        </div>
        <div class="col-md-9">
            <?php foreach($rows as $row) :?>
                <div class="panel panel-default">
                    <div class="panel-heading"><a target="_blank" href="news-view.php?pid=<?php echo $row['pid']?>"><?php echo $row['title'] ;?></a></div>
                    <div class="panel-body">
                        <p>
                            <?php echo mb_substr(strip_tags($row['contact'] ),0,195);?>
                        </p>
                    </div>
                </div>
            <?php endforeach;?>
        </div>
    </div>
</div>
</body>
</html>